bcm2835-mmc: Prevent DMA race condition
authorPhil Elwell <phil@raspberrypi.org>
Tue, 18 Jul 2017 14:30:48 +0000 (15:30 +0100)
committerRaspbian kernel package updater <root@raspbian.org>
Sat, 31 Mar 2018 14:54:28 +0000 (15:54 +0100)
commit56bff375edd5d3f8276282f4c36f3d7460751cd7
tree465a51a6b0094f4eb126f15d4c8cf0f33a51c3a4
parent657e4ca65710a258b08a5f174646c37d7028f530
bcm2835-mmc: Prevent DMA race condition

The end of a read operation is triggered by the completion of the DMA
transfer, but writes are complete when the data IRQ is raised. The
bcm2835-mmc driver contains a race between the handling of the DMA
completion interrupt and the submission of the next request. Fix the
race by deferring the completion of the request until the DMA
transfer finishes.

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
drivers/mmc/host/bcm2835-mmc.c